const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  // 开启代理
  devServer: {
    port: 8888,
    open: '/#/login',
    allowedHosts: 'all',
    hot: true,
    client: {
      overlay: {
        warnings: true,
        errors: true
      }
    },
    proxy: {
      '/api': {
        target: process.env.VUE_APP_URL,
        ws: false,
        secure: false,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
})
